package com.flsoft.sspider.db;

import java.sql.Connection;
import java.sql.SQLException;

public class DriverManager {
	public static Connection getConnection() throws ClassNotFoundException, SQLException{
		Class.forName("com.mysql.jdbc.Driver");
//		String url = "jdbc:mysql://192.168.1.11/medicine?useUnicode=true&amp;characterEncoding=UTF-8";
		String url = "jdbc:mysql://192.168.1.20/magazine?useUnicode=true&amp;characterEncoding=UTF-8";
		return java.sql.DriverManager.getConnection(url, "root", "hnygdz");
	}
	
	public static void main(String[] args) throws ClassNotFoundException, SQLException {
		if(DriverManager.getConnection()!=null){
			System.out.println("Success!");
		}
	}
}
